import com.java.demo.controller.UserController;
import com.java.demo.controller.UserController2;
import com.java.demo.enity.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        ApplicationContext context = new
                ClassPathXmlApplicationContext("spring-config.xml");
        UserController controller =
                context.getBean("userController", UserController.class);
        controller.printUser();

        UserController2 controller2 =
                context.getBean("userController2", UserController2.class);
        controller2.printUser2();
    }
}
